package select;

import java.util.Comparator;
import java.util.List;

import neural.Individual;

public abstract class Mix implements Selection {

	private int eliteSelected;
	
	public Mix(int eliteSelected){
		this.eliteSelected = eliteSelected;
	}
	
	@Override
	public List<Individual> select(List<Individual> individuals, int amount, Comparator<Individual> comparator) {
		
		List<Individual> selected;
		
		Elite elite = new Elite();
		selected = elite.select(individuals, eliteSelected, comparator);
		return getOthers(selected,individuals,amount);
	}
	
	

	public int getEliteSelected() {
		return eliteSelected;
	}

	public void setEliteSelected(int eliteSelected) {
		this.eliteSelected = eliteSelected;
	}

	public abstract List<Individual> getOthers(List<Individual> selected, List<Individual> individuals, int amount);
	

}
